eliminating ambiguity from the grammar